﻿using FreeSql;
using FreeSql.DataAnnotations;
using System.ComponentModel;

namespace BlazorLearnWebApp.Entity
{
    [Description("角色表")]
    public class RoleEntity:BaseEntity<RoleEntity,int>
    {

        /// <summary>
        /// 角色名
        /// </summary>
        [Description("角色名")]
        public string? RoleName { get; set; }

        [Navigate(nameof(UserEntity.RoleId))]
        public List <UserEntity>? Users { get; set; }

        [Navigate(ManyToMany =typeof(RoleMenuEntity))]
        public List<MenuEntity>? Menus { get; set; }
    }
}
